export interface IFileType {
  name: string
  note: string
  url: string
}
export interface IUploadRequestData {
  year: string
  projectId: number | undefined
  projectName: string
  departmentId: number | undefined
  note: string
  isNecessary: number
  files: IFileType[]
}

export interface IGetApplyRequestQueryData {
  page: number
  departmentId: number | undefined
  size: number
}
export interface IGetApplyRequestJsonData {
  theYear: string
  projectId: number
  isNecessary: number
  isPass: number
}
export interface IAuditRequestData {
  fileId: number | undefined
  isPass: number | undefined
  applyId: number | undefined
  cause: string
}

export interface IGetApplyListRequestData {
  theYear: string
  projectId: number | undefined
  isNecessary: number | undefined
  isPass: number | undefined
  uploaderId: number | undefined
  departmentId: number | undefined
}

export interface IGetApplyListFileResponseData {
  id: number
  name: string
  url: string
  auditStatus: 0 | 1
  note: string
  cause: string
}
export interface IGetApplyListResponseData {
  id: number
  theYear: string
  projectId: number
  projectName: string
  departmentId: string
  departmentName: string
  note: string
  isNecessary: number
  isPass: number
  files: IGetApplyListFileResponseData[]
}

export interface IGetMultiConditionQueryRequestData {
  name: string
  theYear: string
  departmentId: number | undefined
  projectId: number | undefined
  isNecessary: number | undefined
  auditStatus: number | undefined
  uploaderId: number | undefined
}

export interface IGetMultiConditionQueryResponseData {
  id: number
  url: string
  name: string
  theYear: string
  applyId: number
  departmentId: number
  departmentName: string
  projectId: number
  projectName: string
  isNecessary: number
  auditStatus: number
  note: string
  cause: string
}

export type UploadFileResponseData = IApiResponseData<{ url: string }>
export type ApplyFileResponseData = IApiResponseData<{}>
export type AuditFileResponseData = IApiResponseData<null>
export type GetApplyListResponseData = IApiResponseData<{ total: number; list: IGetApplyListResponseData[] }>
export type GetMultiConditionQueryResponseData = IApiResponseData<{
  total: number
  list: IGetMultiConditionQueryResponseData[]
}>
export type FileDownloadResponseData = {
  blob: Blob
  fileName: string
}
